package com.luoran.bartalks.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.luoran.bartalks.dao.IBtContainerDao;
import com.luoran.bartalks.dao.IBtMaterielDao;
import com.luoran.bartalks.dao.IBtPlanBizDao;
import com.luoran.bartalks.dao.IBtPlanDetailsDao;
import com.luoran.bartalks.dao.IBtPlanEntryDao;
import com.luoran.bartalks.dao.IBtPlanTemplateDao;
import com.luoran.bartalks.dao.IBtProjectDao;
import com.luoran.bartalks.dao.IBtProjectMemberDao;
import com.luoran.bartalks.entity.biz.BtContainer;
import com.luoran.bartalks.entity.biz.BtMateriel;
import com.luoran.bartalks.entity.biz.BtPlanBiz;
import com.luoran.bartalks.entity.biz.BtPlanDetails;
import com.luoran.bartalks.entity.biz.BtPlanEntry;
import com.luoran.bartalks.entity.biz.BtPlanTemplate;
import com.luoran.bartalks.entity.biz.BtProject;
import com.luoran.bartalks.entity.biz.BtProjectMember;
import com.luoran.bartalks.service.IBtProjectReportService;

@Service
public class BtProjectReportService implements IBtProjectReportService {

	@Autowired
	private IBtProjectDao iBtProjectDao;
	@Autowired
	private IBtProjectMemberDao iBtProjectMemberDao;
	@Autowired
	private IBtPlanDetailsDao iBtPlanDetailsDao;
	@Autowired
	private IBtPlanEntryDao iBtPlanEntryDao;
	@Autowired
	private IBtPlanBizDao IBtPlanBizDao;
	@Autowired
	private IBtPlanTemplateDao iBtPlanTemplateDao;
	@Autowired
	private IBtMaterielDao iBtMaterielDao;
	@Autowired
	private IBtContainerDao iBtContainerDao;

	@Override
	public List<BtProject> queryProjectByCompanyIdofReport(String CompanyId, int startRow) {
		return iBtProjectDao.queryProjectByCompanyIdofReport(CompanyId, startRow);
	}

	@Override
	public List<BtProjectMember> getProjectMemberByProjectIdAndMembertype(String projectId, int membertype) {
		return iBtProjectMemberDao.getProjectMemberByProjectIdAndMembertype(projectId, membertype);
	}

	@Override
	public List<BtPlanDetails> queryPlanByProjectIdOfReport(String projectId, int startRow) {
		return iBtPlanDetailsDao.queryPlanByProjectIdOfReport(projectId, startRow);
	}

	@Override
	public List<BtPlanEntry> getPlanEntryByPlanIdOfReport(String planId) {
		return iBtPlanEntryDao.getPlanEntryByPlanIdOfReport(planId);
	}


	@Override
	public List<BtPlanBiz> findArrive(String projectId, String planId, String planPositionId) {
		return IBtPlanBizDao.findArrive(projectId, planId, planPositionId);
	}

	@Override
	public BtPlanDetails getPlanInfoByIdOfReport(String planId) {
		return iBtPlanDetailsDao.getPlanInfoByIdOfReport(planId);
	}

	@Override
	public BtPlanTemplate getTemplateNameById(String id) {
		return iBtPlanTemplateDao.single(id);
	}

	@Override
	public List<BtPlanEntry> getPlanEntryException(String planId) {
		return iBtPlanEntryDao.getPlanEntryException(planId);
	}

	@Override
	public List<BtMateriel> getMaterielByPlanEntryIdOfReport(String planEntryId, int startRow,String type) {
		return iBtMaterielDao.getMaterielByPlanEntryIdOfReport(planEntryId,startRow,type);
	}

	
	@Override
	public BtContainer findContainerTypeById(String containerId) {
		return iBtContainerDao.findContainerTypeById(containerId);
	}

	@Override
	public BtPlanEntry getPlanEntryByPlanIdAndSign(String planId, String companyId, int sign) {
		return iBtPlanEntryDao.getPlanEntryByPlanIdAndSign(planId,companyId,sign);
	}

	@Override
	public BtPlanEntry getPlanEntryById(String Id) {
		return iBtPlanEntryDao.single(Id);
	}


}
